New Component Configurations
- Normally when I create a new component, I configure it this way
- In the
index.js
import React from "react"
import { Wrapper } from "./styles"
export function Something() {
return(
<Wrapper>
<h1>Something</h1>
</Wrapper>
)
}
- In the
styles.js
- Note this uses the styled - components
import styled from "styled-components"
import { colors } from "../../styles/GlobalStyles"
export const Wrapper = styled.div`
margin: 30px;
`